<%@ include file="/common/taglibs.jsp"%>
<probiz:pageHeading pageHeadingKey="giftCategoryList.heading" />
<content tag="buttons">
	<%@ include file="include/giftCategoryTreeAction.jspf"%>
</content>

<div class="tree">
	<div class="tree_wrap">
		<div class="hd"></div>
		<form method="post" action="${ctxPath}/catalog/giftCategory.html">
			<div class="content" id="categoryTree">
				<%@ include file="include/giftCategoryTreeBody.jspf"%>
			</div>
		</form>
		<div class="ft"></div>
	</div>
</div>
<div class="tree_r">
	<div id="categoryFormDiv" class="tree_r_wrap">
		<%--load file="/catalog/giftCategoryForm.jsp" --%>
	</div>
</div>


<%-----start:list需要加载的JS ----%>
<c:set var="plugin_tree" value="true" scope="request"/>
<script type="text/javascript" src="${ctxPath}/scripts/probiz/catalog/giftCategoryList.js?rs=${appConfig.rs}"></script>
<%-----end:  list需要加载的JS ----%>

<%-----start:form需要加载的JS ----%>
<c:set var="plugin_upload" value="true" scope="request"/>
<c:set var="plugin_htmlEditor" value="true" scope="request"/>
<c:set var="ui_dialog" value="true" scope="request"/>
<c:set var="ui_tabs" value="true" scope="request"/>
<c:set var="ui_sortable_js" value="true" scope="request"/>
<script type="text/javascript"	src="${ctxPath}/scripts/probiz/catalog/giftCategoryForm.js?rs=${appConfig.rs}"></script>
<%-----end:  form需要加载的JS ----%>

<script type="text/javascript">
$j(document).ready(function () {
	__FMTExtend = {
		categoryList_overMaxDepth:"<fmt:message key="categoryList.overMaxDepth"/>",
		giftCategoryDetail_save_successed:"<fmt:message key="giftCategoryDetail.save.successed"/>",
		giftCategoryDetail_recommendResult_saveFirst:"<fmt:message key="giftCategoryDetail.recommendResult.saveFirst"/>",
		giftDetail_recommendResult_none:"<fmt:message key="giftDetail.recommendResult.none"/>",
		giftForm_adddRecommended_noRepeat:"<fmt:message key="giftForm.adddRecommended.noRepeat"/>",
		giftForm_adddRecommended_noSelf:"<fmt:message key="giftForm.adddRecommended.noSelf"/>"
	};
	$j.extend(__FMT, __FMTExtend); 
});	


$j(document).ready(function () {
	jCategoryTree = $j('#categoryTree > ul').simpleTree({
		drag:false,
		afterClick:function(node){
			clickTreeItemAction();
		},
		afterDblClick:function(node){
		},
		afterMove:function(destination, source, pos){
		},
		afterAjax:function()
		{
		},
		animate:true
		//,docToFolderConvert:true
	})[0];
	$j("#categoryTree").show();
	
	//默认显示“主页”
	activeTreeItem(jCategoryTree,"${treeRoot.categoryId }");
	editCategoryForm("${treeRoot.categoryId }");
	
});

</script>


